/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author mosipdkara
 */
@Entity
@Table(name = "isdurumu")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Isdurumu.findAll", query = "SELECT i FROM Isdurumu i"),
    @NamedQuery(name = "Isdurumu.findByIsDurumId", query = "SELECT i FROM Isdurumu i WHERE i.isDurumId = :isDurumId"),
    @NamedQuery(name = "Isdurumu.findByIsDurumAdi", query = "SELECT i FROM Isdurumu i WHERE i.isDurumAdi = :isDurumAdi"),
    @NamedQuery(name = "Isdurumu.findByIsDurumAciklama", query = "SELECT i FROM Isdurumu i WHERE i.isDurumAciklama = :isDurumAciklama")})
public class Isdurumu implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "IsDurumId")
    private Integer isDurumId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "IsDurumAdi")
    private String isDurumAdi;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "IsDurumAciklama")
    private String isDurumAciklama;
    @OneToMany(mappedBy = "talepEdilenIsEskiDurumId")
    private List<Iskayit> iskayitList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "talepEdilenIsYeniDurumId")
    private List<Iskayit> iskayitList1;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "talepIsDurumId")
    private List<Talepedilenis> talepedilenisList;

    public Isdurumu() {
    }

    public Isdurumu(Integer isDurumId) {
        this.isDurumId = isDurumId;
    }

    public Isdurumu(Integer isDurumId, String isDurumAdi, String isDurumAciklama) {
        this.isDurumId = isDurumId;
        this.isDurumAdi = isDurumAdi;
        this.isDurumAciklama = isDurumAciklama;
    }

    public Integer getIsDurumId() {
        return isDurumId;
    }

    public void setIsDurumId(Integer isDurumId) {
        this.isDurumId = isDurumId;
    }

    public String getIsDurumAdi() {
        return isDurumAdi;
    }

    public void setIsDurumAdi(String isDurumAdi) {
        this.isDurumAdi = isDurumAdi;
    }

    public String getIsDurumAciklama() {
        return isDurumAciklama;
    }

    public void setIsDurumAciklama(String isDurumAciklama) {
        this.isDurumAciklama = isDurumAciklama;
    }

    @XmlTransient
    public List<Iskayit> getIskayitList() {
        return iskayitList;
    }

    public void setIskayitList(List<Iskayit> iskayitList) {
        this.iskayitList = iskayitList;
    }

    @XmlTransient
    public List<Iskayit> getIskayitList1() {
        return iskayitList1;
    }

    public void setIskayitList1(List<Iskayit> iskayitList1) {
        this.iskayitList1 = iskayitList1;
    }

    @XmlTransient
    public List<Talepedilenis> getTalepedilenisList() {
        return talepedilenisList;
    }

    public void setTalepedilenisList(List<Talepedilenis> talepedilenisList) {
        this.talepedilenisList = talepedilenisList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (isDurumId != null ? isDurumId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Isdurumu)) {
            return false;
        }
        Isdurumu other = (Isdurumu) object;
        if ((this.isDurumId == null && other.isDurumId != null) || (this.isDurumId != null && !this.isDurumId.equals(other.isDurumId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.Isdurumu[ isDurumId=" + isDurumId + " ]";
    }
    
}
